// eslint-disable-next-line no-undef
const CompressionWebpackPlugin = require("compression-webpack-plugin");
// eslint-disable-next-line no-undef
// TODO：服务器未配置gz压缩  暂时保留原文件
module.exports = {
  compressionWebpackPlugin: () => {
    return new CompressionWebpackPlugin({
      algorithm: "gzip",
      test: /\.(js|css|svg|png|jpg)$/,
      deleteOriginalAssets: false, // 暂时保留原文件
      threshold: 1024,
      minRatio: 0.8
    });
  }
};
